 function SlideShow(slideList, altList, linkList, image, speed, name)
{
	this.slideList = slideList;
	this.altList = altList;
	this.linkList = linkList;
	this.image = image;
	this.speed = speed;
	this.name = name;
	this.current = -1;
	this.timer = 0;
	this.flag = true;
	this.imgwidth = 520;
	this.imgheight =240;
	this.ShowPageType=0;
	this.ShowPageWidth=800;
	this.ShowPageHeight=600;
}
 function SlideShowSize(slideList, altList, linkList, image, speed, name,imgWidth,imgHeight,showPageType,showPageWidth,showPageHeight)
{
	this.slideList = slideList;
	this.altList = altList;
	this.linkList = linkList;
	this.image = image;
	this.speed = speed;
	this.name = name;
	this.current = -1;
	this.timer = 0;
	this.flag = true;
	this.imgwidth=imgWidth;
	this.imgheight=imgHeight;	
	this.ShowPageType=showPageType;	
	this.ShowPageWidth=showPageWidth;
	this.ShowPageHeight=showPageHeight;
}
SlideShow.prototype.over = SlideShow_over;
SlideShow.prototype.out = SlideShow_out;
SlideShow.prototype.play = SlideShow_play;
SlideShow.prototype.next = SlideShow_next; 
SlideShow.prototype.go = SlideShow_go;
SlideShow.prototype.init = SlideShow_init;
SlideShowSize.prototype.over = SlideShow_over;
SlideShowSize.prototype.out = SlideShow_out;
SlideShowSize.prototype.play = SlideShow_play;
SlideShowSize.prototype.next = SlideShow_next; 
SlideShowSize.prototype.go = SlideShow_go;
SlideShowSize.prototype.init = SlideShow_init;
function SlideShow_go()
{
   if(this.ShowPageType==0)
	  window.open(this.linkList[this.current],'newwindow');
   else
	  window.open(this.linkList[this.current],'','width='+this.ShowPageWidth+',height='+this.ShowPageHeight);
}
function SlideShow_init()
{
	var s= this.name + ".go()";
	document.write('<a href="javascript:' + s +'"> <img style="FILTER: BlendTrans(duration=1);"border=0 scr="' + this.slideList[this.current] +'"name="'+this.image+'"></a>');
	document.write('<div style="FILTER: ALPHA(opacity=90);position:relative;left:-5px;text-align:left;overflow: hidden;top:-23px;height:20px;">');
	document.write('<div style="left:0px;text-align: right; width:inherit;">');
	for(var i=0;i<this.slideList.length;i++){
		s= this.name + ".next('" + i + "')";
		var sover = this.name + ".over('" + i + "')";
		var sout = this.name + ".out('" + i + "')";
		document.write('<a style=\"padding:0px 5px;border:solid 1px #eee;\" id="link'+i+'" href="javascript:' + s + '" class="button" style="cursor:hand;" onmouseover="'+ sover+ '" onmouseout="'+ sout+ '" title="'+this.altList[i]+'">'+ (i+1) +'</a>');
	}
	document.write('</div>');
	document.write('</div>');
}
function SlideShow_over(id)
{
	document.getElementById('link'+id).style.color="#fff";
	document.getElementById('link'+id).style.background="#f90";
}
function SlideShow_out(id)
{
	if (this.current == id){
		document.getElementById('link'+id).style.color="#fff";
		document.getElementById('link'+id).style.background="#f60";
	}
	else
	{
		document.getElementById('link'+id).style.color="#fff";
		document.getElementById('link'+id).style.background="#aaa";
	}
}
function SlideShow_next(id) 
{
	if (document.images)
	{
		if (this.slideList[id] != "none")
		{
			this.current = id;
			if (navigator.appName != "Netscape")
			{
				if (this.flag == false)
				{
					document.images[this.image].filters.BlendTrans.apply();
				}
			}
			document.images[this.image].src = this.slideList[id];
			document.images[this.image].alt = this.altList[id];
			document.images[this.image].width  = this.imgwidth;
			document.images[this.image].height = this.imgheight;
			document.getElementById('link'+id).style.color="#FFFFFF";
			document.getElementById('link'+id).style.background="#f60";
			for (var i=0;i<this.slideList.length;i++)
			{
			   if (i != id){
				   document.getElementById('link'+i).style.color="#fff";
				   document.getElementById('link'+i).style.background="#aaa";
				}
			}
			if (navigator.appName != "Netscape")
			{
				if (this.flag)
				{
					this.flag = false;
				}
				else if (document.all)
				{
					document.images[this.image].filters.BlendTrans.play();
				}
			}
			clearTimeout(this.timer);
			this.timer = setTimeout(this.name+'.play()', this.speed);
		}
	}
}
function SlideShow_play()
{
	with(this)
	{
		current++;
		current = current % slideList.length;
		next(current);
	}
}